using System.Collections;
using System.Collections.Generic;
using Ecs.Batch;
using UnityEngine;

public class ComMeshFighter : ComMeshBase
{
    public override int GetAnimId(string materialName)
    {
        var splitIndex = materialName.IndexOf('_') + 1;
        var spaceIndex = materialName.IndexOf('(') - 1;
        var animIdStr = materialName.Substring(splitIndex, spaceIndex - splitIndex);
        if (!int.TryParse(animIdStr, out var animId))
        {
            Debug.LogError($"材质球命名读取失败，请检查 material: {materialName}, animId: {animIdStr}");
            return 0;
        }
        return animId;
    }
}
